package com.biancheng.biancheng.biancheng2;

import java.util.Scanner;

public class 股票报价 {

    public static void main(String[] args) {
        Scanner sc1 = new Scanner(System.in);
        String inputString = sc1.nextLine();
        String stringArray[] = inputString.split(" ");
        int nums[] = new int[stringArray.length];
        for (int i = 0; i < stringArray.length; i++) {
            nums[i] = Integer.parseInt(stringArray[i]);
        }
        int target = sc1.nextInt();
        for (int i = 0; i < nums.length; i++) {
            for (int j = i + 1; j < nums.length; j++) {
                if (nums[i] + nums[j] == target) {
                    if(nums[i]>nums[j]){
                        int temp=nums[j];
                        nums[j]=nums[i];
                        nums[i]=temp;

                    }
                    System.out.println(nums[i] + " " + nums[j]);
                }
            }
        }
    }

}
